#include<bits/stdc++.h>
#include<cstdio>
using namespace std;
int n, a[10005], s[10005], sum, g, b, m=-1000;
int main()
{
    freopen("duel.in","w",stdin);
    freopen("duel.out","r",stdout);
    cin>>n;
    sum=n;
    for(int i=1;i<=n;i++)
    {
        cin>>a[i];
        s[a[i]]++;
        m=max(m, a[i]);
    }
    for(int i=1;i<=m;i++)
    {
        if(s[i]>=1)
        {
            b=s[i];
            if(b>=g)
            {
                sum-=g;
                g=b;
                b=0;
            }
            else if(b<g)
            {
                sum-=b;
                g-=b;
                b=0;
            }
        }
    }
    cout<<sum;
    return 0;
}
